/* eslint-disable global-require */
import Vue from 'vue'
import axios from 'axios'
import './styles/index.scss'

import tsText from './components/ts-components/ts-text.vue'
import tsLineChart from './components/ts-components/ts-line-chart.vue'
import tsIframe from './components/ts-components/ts-iframe.vue'
import tsSelectDataDictionary from './components/ts-components/ts-select-data-dictionary.vue'
import tsUniversalSelect from './components/ts-components/ts-universal-select.vue'
import tsSubForm from './components/ts-components/ts-sub-form/index.vue'
import tsUpload from './components/ts-components/ts-upload.vue'
import tsImgUpload from './components/ts-components/ts-img-upload.vue'
import tsDeviceAdd from './components/ts-components/ts-device-add.vue'
import tsErrorReview from './components/ts-components/ts-error-review.vue'

import FormGenerator from './views/index/Home.vue'

if (!Vue.prototype.$axios) {
  Vue.prototype.$axios = axios
}

function install(vue, options) {
  vue.component('tsText', tsText)
  vue.component('tsLineChart', tsLineChart)
  vue.component('tsIframe', tsIframe)
  vue.component('tsSelectDataDictionary', tsSelectDataDictionary)
  vue.component('tsUniversalSelect', tsUniversalSelect)
  vue.component('tsSubForm', tsSubForm)
  vue.component('tsUpload', tsUpload)
  vue.component('tsImgUpload', tsImgUpload)
  vue.component('tsDeviceAdd', tsDeviceAdd)
  vue.component('tsErrorReview', tsErrorReview)
  vue.component('FormGenerator', FormGenerator)
}
export default {
  install
}
